 package handling.world.party;

 import client.MapleCharacter;
 import java.awt.Point;
 import java.io.Serializable;
 import java.util.List;
 import server.maps.MapleDoor;




 public class MaplePartyCharacter
   implements Serializable
 {
   private static final long serialVersionUID = 6215463252132450750L;
   private final String name;
   private int id;
   private int level;
   private int channel;
   private int jobid;
   private int mapid;
/*  22 */   private int doorTown = 999999999;
/*  23 */   private int doorTarget = 999999999;
/*  24 */   private int doorSkill = 0;
/*  25 */   private Point doorPosition = new Point(0, 0);
   private boolean online;

   public MaplePartyCharacter(MapleCharacter maplechar) {
/*  29 */     this.name = maplechar.getName();
/*  30 */     this.level = maplechar.getLevel();
/*  31 */     this.channel = maplechar.getClient().getChannel();
/*  32 */     this.id = maplechar.getId();
/*  33 */     this.jobid = maplechar.getJob();
/*  34 */     this.mapid = maplechar.getMapId();
/*  35 */     this.online = true;

/*  37 */     List<MapleDoor> doors = maplechar.getDoors();
/*  38 */     if (doors.size() > 0) {
/*  39 */       MapleDoor door = doors.get(0);
/*  40 */       this.doorTown = door.getTown().getId();
/*  41 */       this.doorTarget = door.getTarget().getId();
/*  42 */       this.doorSkill = door.getSkill();
/*  43 */       this.doorPosition = door.getTargetPosition();
     } else {
/*  45 */       this.doorPosition = maplechar.getPosition();
     }
   }

   public MaplePartyCharacter() {
/*  50 */     this.name = "";
   }

   public int getLevel() {
/*  54 */     return this.level;
   }

   public int getChannel() {
/*  58 */     return this.channel;
   }

   public boolean isOnline() {
/*  62 */     return this.online;
   }

   public void setOnline(boolean online) {
/*  66 */     this.online = online;
   }

   public int getMapid() {
/*  70 */     return this.mapid;
   }

   public String getName() {
/*  74 */     return this.name;
   }

   public int getId() {
/*  78 */     return this.id;
   }

   public int getJobId() {
/*  82 */     return this.jobid;
   }

   public int getDoorTown() {
/*  86 */     return this.doorTown;
   }

   public int getDoorTarget() {
/*  90 */     return this.doorTarget;
   }

   public int getDoorSkill() {
/*  94 */     return this.doorSkill;
   }

   public Point getDoorPosition() {
/*  98 */     return this.doorPosition;
   }


   public int hashCode() {
/* 103 */     int prime = 31;
/* 104 */     int result = 1;
/* 105 */     result = prime * result + ((this.name == null) ? 0 : this.name.hashCode());
/* 106 */     return result;
   }


   public boolean equals(Object obj) {
/* 111 */     if (this == obj) {
/* 112 */       return true;
     }
/* 114 */     if (obj == null) {
/* 115 */       return false;
     }
/* 117 */     if (getClass() != obj.getClass()) {
/* 118 */       return false;
     }
/* 120 */     MaplePartyCharacter other = (MaplePartyCharacter)obj;
/* 121 */     if (this.name == null) {
/* 122 */       if (other.name != null) {
/* 123 */         return false;
       }
/* 125 */     } else if (!this.name.equals(other.name)) {
/* 126 */       return false;
     }
/* 128 */     return true;
   }
 }


/* Location:              C:\PGX\Server.jar!\handling\world\party\MaplePartyCharacter.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */